Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate latest thumbnail image for each segment #37

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Generate latest thumbnail image for each segment #37

merged 6 commits into from
Oct 23, 2023

Conversation

mjh1
Copy link
Contributor

@mjh1 mjh1 commented Oct 17, 2023

No description provided.

@mjh1 mjh1 requested a review from thomshutt October 17, 2023 19:36
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #37 (bb3923c) into main (7306780) will increase coverage by 17.48252%.
The diff coverage is 0.00000%.

Impacted file tree graph

@@               Coverage Diff               @@
##           main         #37          +/-   ##
===============================================
+ Coverage      0   17.48252%   +17.48252%     
===============================================
  Files         0           2           +2     
  Lines         0         143         +143     
===============================================
+ Hits          0          25          +25     
- Misses        0         109         +109     
- Partials      0           9           +9     
Files Coverage Δ
core/uploader.go 23.36449% <0.00000%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7306780...bb3923c. Read the comment docs.

Files Coverage Δ
core/uploader.go 23.36449% <0.00000%> (ø)

... and 1 file with indirect coverage changes

core/uploader.go Outdated
defer f.Close()
_, err = session.SaveData(context.Background(), "../latest.jpg", f, &drivers.FileProperties{CacheControl: "max-age=5"}, 1*time.Minute)
if err != nil {
log.Printf("Saving thumbnail failed: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get some context on these log lines so we can correlate to a particular upload URL

@mjh1 mjh1 requested a review from thomshutt October 19, 2023 14:50
core/uploader.go Outdated
func extractThumb(uri string, session drivers.OSSession) {
presigned, err := session.Presign("", 5*time.Minute)
if err != nil {
log.Printf("Presigning failed for %s: %s", uri, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have this method return an error and then just log that (and add the URI context at that top level)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that would make a lot more sense :)

@mjh1 mjh1 merged commit de93a9a into main Oct 23, 2023
10 checks passed
@mjh1 mjh1 deleted the mh/thumbs branch October 23, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants